/*
 * @Author: scopesang
 * @Date: 2022-05-10 13:29:23
 * @LastEditors: scopesang
 * @LastEditTime: 2022-05-10 13:29:33
 * @FilePath: \TypeScript\src\class\static.ts
 * @Description: 
 * 
 * Copyright (c) 2022 by scopesang/大鹏科技, All Rights Reserved. 
 */
// 加上static的属性与方法，无需实例化即可调用：
class Animal {
    // 直接给静态属性赋值
    static username: string = "张三";
}

Animal.username; // 张三